import instance from "@/utils/request";

// 对于和管理员的增删改查
export const getAdminTables = (params) => {
  return instance({
    method: "get",
    url: "/adminTable/getAdminTables",
    params,
  });
};

export const updateAdminTables = (data) => {
  return instance({
    method: "put",
    url: "/adminTable/updateAdminTable",
    data,
  });
};
export const addAdminTables = (data) => {
  return instance({
    method: "post",
    url: "/adminTable/addAdminTable",
    data,
  });
};
export const deleteAdminTables = (data) => {
  return instance({
    method: "delete",
    url: `/adminTable/deleteAdmin/${data}`,
  });
};
// 对于角色的增删改查
export const getCadreTables = (params) => {
  return instance({
    method: "get",
    url: "/adminToCadre/getCadreTables",
    params,
  });
};

export const updateadreTables = (data) => {
  return instance({
    method: "put",
    url: "/adminToCadre/updateCadreTable",
    data,
  });
};
export const addCadreTables = (data) => {
  return instance({
    method: "post",
    url: "/adminToCadre/addCadreTable",
    data,
  });
};
export const deleteCadreTables = (data) => {
  return instance({
    method: "delete",
    url: `/adminToCadre/deleteCadreTable/${data}`,
  });
};


